//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
//     Copyright (c) Telligent Systems Corporation.  All rights reserved.
// </copyright> 
//------------------------------------------------------------------------------

using System;
using System.Web.UI.WebControls;

using CommunityServer.Components;

namespace CommunityServer.Controls {
    
    public class UserBanReasonDropDownList: DropDownList {

        public UserBanReasonDropDownList() {

            // Add countries
            //
            Items.Add(new ListItem(CommunityServer.Components.ResourceManager.GetString("Utility_UserBanReason_Profanity"), ((int) UserBanReason.Profanity).ToString()));
            Items.Add(new ListItem(CommunityServer.Components.ResourceManager.GetString("Utility_UserBanReason_Advertising"), ((int) UserBanReason.Advertising).ToString()));
            Items.Add(new ListItem(CommunityServer.Components.ResourceManager.GetString("Utility_UserBanReason_Spam"), ((int) UserBanReason.Spam).ToString()));
            Items.Add(new ListItem(CommunityServer.Components.ResourceManager.GetString("Utility_UserBanReason_Aggresive"), ((int) UserBanReason.Aggresive).ToString()));
            Items.Add(new ListItem(CommunityServer.Components.ResourceManager.GetString("Utility_UserBanReason_BadUsername"), ((int) UserBanReason.BadUsername).ToString()));
            Items.Add(new ListItem(CommunityServer.Components.ResourceManager.GetString("Utility_UserBanReason_BadSignature"), ((int) UserBanReason.BadSignature).ToString()));
            Items.Add(new ListItem(CommunityServer.Components.ResourceManager.GetString("Utility_UserBanReason_BanDodging"), ((int) UserBanReason.BanDodging).ToString()));
            Items.Add(new ListItem(CommunityServer.Components.ResourceManager.GetString("Utility_UserBanReason_Other"), ((int) UserBanReason.Other).ToString()));
        }

        public new UserBanReason SelectedValue {
            get { return (UserBanReason) int.Parse(base.SelectedValue); }
            set { base.SelectedValue = ((int) value).ToString(); }
        }

    }
}
